<template>
  <div>
    <input type="text" @keydown.enter="entrFn" />
    <hr />
    <input type="text" @keydown.esc="escFn" />
  </div>
</template>

<script>
export default {
  methods: {
    entrFn() {
      console.log("enter回车键按了");
    },
    escFn() {
      console.log("esc按键了");
    },
  },
};
</script>

<style lang="scss" scoped></style>
